import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {PhpComponent} from './php/php.component';
import {PythonComponent} from './python/python.component';
import {RouterModule, Routes} from '@angular/router';
import {BackComponent} from './back.component';
import {JavaComponent} from './java/java.component';

const backRoutes: Routes = [
  {path: '', component: BackComponent, children: [
      {path: 'java', component: JavaComponent},
      {path: 'php', component: PhpComponent},
      {path: 'python', component: PythonComponent}
    ]}
];

@NgModule({
  imports: [
    CommonModule,
    RouterModule.forChild(backRoutes)
  ],
  declarations: [BackComponent, JavaComponent, PhpComponent, PythonComponent]
})
export class BackModule { }
